// ----------------------------------------------------------------------------
// gfx_device_osx.h
// ----------------------------------------------------------------------------
#ifndef FW_GFX_DEVICE_OSX_H
#define FW_GFX_DEVICE_OSX_H
#include <fw/graphics/gfx_device.h>

// lowlevel interface（ユーザーは直接操作しない）
void    GfxOpenWindow   ( int x0, int y0, int width, int height );
void    GfxGetWindowSize( int &width, int &height );
void    GfxPollDevice   ( void );
void    GfxSleep        ( int ms );
int     GfxPassedTime   ( void );
void    GfxMouse        ( int &lb, int &mb, int &rb, int &mx, int &my );
int     GfxMouseEvent   ( int &lb, int &mb, int &rb, int &mx, int &my );
void    GfxSwapBuffer   ( void );
int     GfxInKey        ( void );
int     GfxInKeyChar    ( void );
int     GfxKeyState     ( int keyState );
void    GfxChangeToProgramDir( void );
int     GfxCheckExposure( void );

namespace fw
{
    class GfxDeviceInternal
    {
    private:
        
        int                 m_mouselb;
        int                 m_mousemb;
        int                 m_mouserb;
        int                 m_mousex;
        int                 m_mousey;
        
    public:
         GfxDeviceInternal(const GfxDeviceConfig& config);
        ~GfxDeviceInternal();
        
        bool                PollDevice();
        
        bool                Flip();
        
    }; // class GfxDeviceInternal 
    
} // namespace fw

#endif // FW_GFX_DEVICE_OSX_H
